@isTest

private class FindDuplicateFieldValuesTest{

    static testmethod void testBatchAccount(){
       Test.StartTest();
       FindDuplicateFieldValues batch = new FindDuplicateFieldValues('Account','CleanPhoneText__c', 200, 'Unit Test 1', 'www');
       ID batchprocessid = Database.executeBatch(batch);
       Test.StopTest();
       
       AsyncApexJob aaj = [SELECT Id, Status, JobItemsProcessed, TotalJobItems, NumberOfErrors FROM AsyncApexJob WHERE ID =: batchprocessid ];
       System.AssertEquals(0, aaj.NumberOfErrors);

   }
   
    static testmethod void testBatchContact(){
       Test.StartTest();
       FindDuplicateFieldValues batch = new FindDuplicateFieldValues('Contact','FirstName', 100, 'Unit Test 3', 'www');
       //batch.MergeDuplicateObjects = true; // We can't merge API controlled objects.
       ID batchprocessid = Database.executeBatch(batch);
       Test.StopTest();
       
       AsyncApexJob aaj = [SELECT Id, Status, JobItemsProcessed, TotalJobItems, NumberOfErrors FROM AsyncApexJob WHERE ID =: batchprocessid ];
       System.AssertEquals(0, aaj.NumberOfErrors);
   }
   
}